package springinaction.events;

import org.springframework.context.ApplicationEvent;

public class CustomEvent extends ApplicationEvent {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private Course course;
	
	public CustomEvent(Object source, Course course) {
		super(source);
		this.course = course;
	}

	public Course getCourse() {
		return course;
	}
	
	public String toString(){
	    return "My Custom Event with param :" + course.name;
	}

}
